* man.el (manual-entry): Recognize the subject(section) syntax.
authorJim Blandy <jimb@redhat.com>
Fri, 11 Jun 1993 10:29:55 +0000 (10:29 +0000)
committerJim Blandy <jimb@redhat.com>
Fri, 11 Jun 1993 10:29:55 +0000 (10:29 +0000)
lisp/man.el

index 3b40ab02d06633b09fcb0582311dc71a9b65d888..26c3aa1400b6b380a830324f2a0678ba6ad118a6 100644 (file)
@@ -419,6 +419,13 @@ Universal argument ARG, is passed to Man-getpage-in-background."
         (if (string= default-entry "")
             (error "No man args given.")
           (setq man-args default-entry)))
+    ;; Recognize the subject(section) syntax.
+    (if (string-match "^[ \t]*\\([^( \t]+\\)[ \t]*(\\([^)]+\\))[ \t]*$"
+                     man-args)
+       (setq man-args
+             (concat (substring man-args (match-beginning 2) (match-end 2))
+                     " "
+                     (substring man-args (match-beginning 1) (match-end 1)))))
     (if Man-downcase-section-letters-p
        (setq man-args (Man-downcase man-args)))
     (Man-getpage-in-background man-args (consp arg))